xen/arm: Revert atomic operation related command-queue insertion patch
authorRahul Singh <rahul.singh@arm.com>
Wed, 20 Jan 2021 14:52:36 +0000 (14:52 +0000)
committerJulien Grall <jgrall@amazon.com>
Sat, 23 Jan 2021 11:48:33 +0000 (11:48 +0000)
commitc46e7d6a0718e960c5662b85df75d57f6303fef6
treed7107b5984f8e3b6072c329f9bea8cb70873e761
parent813b3fb5feb1043827862a4a4d5bff493295e342
xen/arm: Revert atomic operation related command-queue insertion patch

Linux SMMUv3 code implements the commands-queue insertion based on
atomic operations implemented in Linux. Atomic functions used by the
commands-queue insertion are not implemented in XEN therefore revert the
patch that implemented the commands-queue insertion based on atomic
operations.

Reverted the other patches also that are implemented based on the code
that introduced the atomic-operations.

Atomic operations are introduced in the patch "iommu/arm-smmu-v3: Reduce
contention during command-queue insertion" that fixed the bottleneck of
the SMMU command queue insertion operation. A new algorithm for
inserting commands into the queue is introduced in this patch, which is
lock-free on the fast-path.

Consequence of reverting the patch is that the command queue insertion
will be slow for large systems as spinlock will be used to serializes
accesses from all CPUs to the single queue supported by the hardware.

Once the proper atomic operations will be available in XEN the driver
can be updated.

Following commits are reverted in this patch:
1. "iommu/arm-smmu-v3: Add SMMUv3.2 range invalidation support"
    commit 6a481a95d4c198a2dd0a61f8877b92a375757db8.
2. "iommu/arm-smmu-v3: Batch ATC invalidation commands"
    commit 9e773aee8c3e1b3ba019c5c7f8435aaa836c6130.
3. "iommu/arm-smmu-v3: Batch context descriptor invalidation"
    commit edd0351e7bc49555d8b5ad8438a65a7ca262c9f0.
4. "iommu/arm-smmu-v3: Add command queue batching helpers
    commit 4ce8da453640147101bda418640394637c1a7cfc.
5. "iommu/arm-smmu-v3: Fix ATC invalidation ordering wrt main TLBs"
    commit 353e3cf8590cf182a9f42e67993de3aca91e8090.
6. "iommu/arm-smmu-v3: Defer TLB invalidation until ->iotlb_sync()"
    commit 2af2e72b18b499fa36d3f7379fd010ff25d2a984.
7. "iommu/arm-smmu-v3: Reduce contention during command-queue insertion"
    commit 587e6c10a7ce89a5924fdbeff2ec524fbd6a124b.

Signed-off-by: Rahul Singh <rahul.singh@arm.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/drivers/passthrough/arm/smmu-v3.c